const state = {
  tabs: {
    result: '',
    demand: '',
    service: '',
    info: '',
    talents:'',
    IndustryNavigationList: ''
  }
}
const getters = {
  headSearchValueResult: state => state.tabs.result,
  headSearchValueDemand: state => state.tabs.demand,
  headSearchValueService: state => state.tabs.service,
  headSearchValueInfo: state => state.tabs.info,
  headSearchValueTalents: state => state.tabs.talents,
  headSearchValueIndustry: state => state.tabs.IndustryNavigationList
}
const mutations = {
  // 更新tab的value
  updateTabValue(state, params) {
    const { key, value } = params
    if (state.tabs[key] === undefined) {
      console.error('请使用有效的key')
      return
    }
    state.tabs[key] = value
  }
}
const actions = {}

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
}
